function connect(page, tableId, pkname, billType){
    let {socket} = page.props;
    return socket.connectMesg({
        tableAreaCode: tableId, //表格区域编码
        billpkname: pkname ,//表格行主键
        billtype: billType,   //用于查询追溯
        // serverLocation: "10.6.230.224:9991"// 本地前端调试，请传ip和端口
    })
}

function generateSocketOpr(page, record, generateBtnFun){
    return page.props.button.createErrorButton({
        record:record,
        sucessCallBack:()=>{
            return generateBtnFun();
        }
    })
}

const ListSocketUtils = {
    connect:connect,
    generateSocketOpr:generateSocketOpr
}

export default ListSocketUtils;